<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="https://cdn.bootcss.com/vue/2.5.17-beta.0/vue.min.js"></script>
	</head>

	<body>

		<div id="app">
			<model1></model1>
		</div>
		<!--<div id="app2">
			<model1></model1>
		</div>-->
		<script>
			new Vue({
				el: "#app",
				components: {
					"model1": {
						template: "<div><h1>{{message}}</h1> <input v-model='message'/> <button @click='dian'>点点我</button></div>",
						data: function() {
							return {
								message: "你好啊"
							}
						},
						methods: {
							dian: function() {
								alert(11);
							}
						}
					}
				}
			})

			new Vue({
				el: "#app2"
			})
		</script>
	</body>

</html>